﻿<UserControl 
    x:Class="ibba.src.noriskbo.views.childs.ImportarOperacoes"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
    xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:ig="http://schemas.infragistics.com/xaml"
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"  
    xmlns:behavior="clr-namespace:ibba.src.noriskbo.code.behavior"
    xmlns:vm="clr-namespace:ibba.src.noriskbo.ViewModels"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="800">

    <UserControl.Resources>
        <vm:ImportarOperacoesViewModel x:Key="viewModel" />

        <DataTemplate x:Key="CustomRowTemplate">
            <Border CornerRadius="3">
                <Border.Effect>
                    <DropShadowEffect BlurRadius="10" Direction="270" Opacity="0.5" ShadowDepth="1" />
                </Border.Effect>
                <Border.Background>
                    <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                        <GradientStop Offset="0" Color="#FF555555" />
                        <GradientStop Offset="1" Color="Black" />
                        <GradientStop Offset="0.75" Color="#FF222222" />
                    </LinearGradientBrush>
                </Border.Background>
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="1" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>

                    <Path Height="30" Margin="1,1,1,0" VerticalAlignment="Top" 
                          Stretch="Fill" Grid.ColumnSpan="2" Grid.RowSpan="2"
                          Data="M 4.64,1 C2.63,1 1,2.63 1,4.65 1,4.65 1,76 1,76 106.00,42.68 371.74,19.03 683,19.03 720.04,19.03 754.44,19.36 790,20.01 790,20.01 790,4.65 790,4.65 790,2.63 788.36,1 786.34,1 786.34,1 4.64,1 4.64,1 z" >
                        <Path.Fill>
                            <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                <LinearGradientBrush.GradientStops>
                                    <GradientStopCollection>
                                        <GradientStop Offset="0" Color="#7dffffff" />
                                        <GradientStop Offset="0.75" Color="#00ffffff" />
                                        <GradientStop Offset="1" Color="#00ffffff" />
                                    </GradientStopCollection>
                                </LinearGradientBrush.GradientStops>
                            </LinearGradientBrush>
                        </Path.Fill>
                    </Path>
                    <Border Margin="1,1,1,0" BorderThickness="0,1,0,0" CornerRadius="3" Grid.ColumnSpan="2" Grid.RowSpan="2">
                        <Border.BorderBrush>
                            <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
                                <GradientStop Offset="0" Color="#59FFFFFF" />
                                <GradientStop Offset="1" Color="Transparent" />
                                <GradientStop Offset="0.5" Color="White" />
                            </LinearGradientBrush>
                        </Border.BorderBrush>
                    </Border>

                    <Grid Background="White" Grid.Row="1" d:LayoutOverrides="GridBox" Margin="20" VerticalAlignment="Center" HorizontalAlignment="Left">
                        <Grid Margin="1" Background="#FF929191">
                            <Image Source="{Binding StatusImportacao}" MaxWidth="100" Margin="1" Grid.Column="0" Grid.Row="0" />
                        </Grid>
                    </Grid>
                    <Grid Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Left">
                        <Grid VerticalAlignment="Top">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="20" />
                                <!--<RowDefinition Height="20" />
                                <RowDefinition Height="20" />
                                <RowDefinition Height="20" />
                                <RowDefinition Height="20" />-->
                            </Grid.RowDefinitions>

                            <!--<TextBlock x:Name="Contact_Name" Text="{Binding ContactName}" HorizontalAlignment="Left" VerticalAlignment="Center" 
                                       Grid.ColumnSpan="2" Foreground="#FFFFFFFF" FontSize="20" FontFamily="Segoe UI" />-->
                            <TextBlock Text="Erro" 
                                       Foreground="White" TextWrapping="Wrap" 
                                       HorizontalAlignment="Left" 
                                       Margin="0,0,5,0" Opacity="0.5" Grid.Row="1" />
                            <TextBlock x:Name="Customer_ID" Text="{Binding DescricaoErro}" Foreground="White"                                        
                                       HorizontalAlignment="Left" VerticalAlignment="Top" 
                                       Grid.Row="1" Grid.Column="1" />
                            <!--<TextBlock x:Name="Title" Text="{Binding ContactTitle}" Foreground="White"                                        
                                       HorizontalAlignment="Left" VerticalAlignment="Top" 
                                       Grid.Row="2" Grid.Column="1" />
                            <TextBlock x:Name="Country" Text="{Binding Country}" Foreground="White"
                                       HorizontalAlignment="Left" VerticalAlignment="Top" 
                                       Grid.Row="3" Grid.Column="1" />
                            <TextBlock x:Name="Phone" Text="{Binding Phone}" Foreground="White"
                                       Grid.Column="1" Grid.Row="4" 
                                       HorizontalAlignment="Left" VerticalAlignment="Top" />-->

                            <!--<TextBlock Text="{Binding Path=XWG_Customers_ContactTitle, Source={StaticResource Strings}}" 
                                       Foreground="White" TextWrapping="Wrap" 
                                       HorizontalAlignment="Left" 
                                       Margin="0,0,5,0" Opacity="0.5" Grid.Row="2" />
                            <TextBlock Text="{Binding Path=XWG_Customers_Location, Source={StaticResource Strings}}" 
                                       Foreground="White" TextWrapping="Wrap" 
                                       HorizontalAlignment="Left" 
                                       Margin="0,0,5,0" Opacity="0.5" Grid.Row="3" />
                            <TextBlock Text="{Binding Path=XWG_Customers_Phone, Source={StaticResource Strings}}" 
                                       Foreground="White" TextWrapping="Wrap" 
                                       HorizontalAlignment="Left" VerticalAlignment="Top" 
                                       Margin="0,0,5,0" Opacity="0.5" Grid.Row="4" />-->
                        </Grid>
                    </Grid>
                </Grid>
            </Border>
        </DataTemplate>

    </UserControl.Resources>

    <Grid x:Name="LayoutRoot" Background="White" Margin="3,3,3,20" DataContext="{Binding Source={StaticResource viewModel}}">
        <toolkit:BusyIndicator IsBusy="{Binding IsBusy}" BusyContent="{Binding BusyText}">

            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>

                <StackPanel Orientation="Horizontal" VerticalAlignment="Top" Grid.Row="0">
                    <StackPanel Orientation="Vertical" Margin="0,0,0,2" VerticalAlignment="Bottom">
                        <StackPanel Orientation="Horizontal" VerticalAlignment="Bottom">
                            <TextBlock Text="Arquivo:" Style="{StaticResource SubTitleHeader}" VerticalAlignment="Center" FontSize="10"/>
                            <TextBlock Text="{Binding ExcelFileName}" Margin="5,0,0,0" Foreground="#FF0A739D" FontSize="10" />
                        </StackPanel>
                    </StackPanel>
                </StackPanel>

                <Grid Grid.Row="0" Grid.RowSpan="2" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,-40,150,0">
                    <TextBlock Text="Operações" Style="{StaticResource TitlePage}" Margin="0,-10,0,0" FontSize="56" FontFamily="Arial Black" FontStyle="Italic" />
                </Grid>

                <ig:XamGrid x:Name="xgDados" Grid.Row="1" Margin="0,0,0,29" 
                            ItemsSource="{Binding DadosPlanilha}"
                            AutoGenerateColumns="False"
                            RowAdded="xgDados_RowAdded"
                            RowDeleted="xgDados_RowDeleted"
                            RowEnteredEditMode="xgDados_RowEnteredEditMode"
                            DeleteKeyAction="DeleteSelectedRows"
                            FontSize="10">

                    <i:Interaction.Behaviors>
                        <behavior:XamGridBehavior x:Name="xgDadosBehavior" IsExpandRowGrouped="True" IsHeaderCopyToClibboard="True" />
                    </i:Interaction.Behaviors>

                    <ig:XamGrid.SelectionSettings>
                        <ig:SelectionSettings CellClickAction="SelectRow" RowSelection="Multiple" />
                    </ig:XamGrid.SelectionSettings>

                    <ig:XamGrid.RowSelectorSettings>
                        <ig:RowSelectorSettings Visibility="Visible" />
                    </ig:XamGrid.RowSelectorSettings>

                    <ig:XamGrid.AddNewRowSettings>
                        <ig:AddNewRowSettings AllowAddNewRow="Top" IsEnterKeyEditingEnabled="True" IsF2EditingEnabled="True" 
                                              IsMouseActionEditingEnabled="SingleClick" IsOnCellActiveEditingEnabled="False" 
                                              Style="{StaticResource AddRowStyling}" />
                    </ig:XamGrid.AddNewRowSettings>

                    <ig:XamGrid.EditingSettings>
                        <ig:EditingSettings AllowEditing="Row" IsEnterKeyEditingEnabled="True" IsF2EditingEnabled="True"
                                            IsMouseActionEditingEnabled="DoubleClick" IsOnCellActiveEditingEnabled="False" />
                    </ig:XamGrid.EditingSettings>

                    <ig:XamGrid.Columns>
                        <!--<ig:UnboundColumn Key="colExcluir" HeaderText=" " Width="30" IsReadOnly="True" IsFilterable="False" IsGroupable="False" IsResizable="False" IsHideable="False">
                            <ig:UnboundColumn.ItemTemplate>
                                <DataTemplate>
                                    <Button x:Name="btnExcluir" Padding="2" Click="btnExcluir_Click" >
                                        <Image Source="{StaticResource IconeRemover}" Width="16" Height="16" />
                                    </Button>
                                </DataTemplate>
                            </ig:UnboundColumn.ItemTemplate>
                        </ig:UnboundColumn>-->

                        <ig:TemplateColumn Key="StatusImportacao" IsResizable="False" HeaderStyle="{StaticResource GrayHeaderStyle}" >
                            <ig:TemplateColumn.HeaderTemplate>
                                <DataTemplate>
                                    <TextBlock Text="SV" ToolTipService.ToolTip="Status de Validação"/>
                                </DataTemplate>
                            </ig:TemplateColumn.HeaderTemplate>
                            <ig:TemplateColumn.ItemTemplate>
                                <DataTemplate>
                                    <Image Source="{Binding StatusImportacao, Converter={StaticResource StatusImportToImageConverter}}"
                    					Width="22" Height="22" ToolTipService.ToolTip="{Binding DescricaoErro}"
                    					HorizontalAlignment="Center"/>
                                </DataTemplate>
                            </ig:TemplateColumn.ItemTemplate>
                        </ig:TemplateColumn>

                        <ig:TextColumn Key="CodigoContrato" HeaderText="Contrato" Width="100" HeaderStyle="{StaticResource BlueHeaderStyle}" />
                        <ig:TextColumn Key="CodigoProduto" HeaderText="Produto" Width="100" HeaderStyle="{StaticResource BlueHeaderStyle}" />
                        <ig:TextColumn Key="CodigoModalidade" HeaderText="Modalidade" Width="100" HeaderStyle="{StaticResource BlueHeaderStyle}" />
                        <ig:TextColumn Key="IdCliente" HeaderText="Id Cliente" HeaderStyle="{StaticResource BlueHeaderStyle}" />
                        <ig:TextColumn Key="NomeCliente" HeaderText="Nome Cliente" Width="120" IsReadOnly="True" CellStyle="{StaticResource CellColumnStyle}" HeaderStyle="{StaticResource BlueHeaderStyle}" />

                        <ig:TextColumn Key="Veiculo" HeaderText="Veículo Legal"  Width="120" HeaderStyle="{StaticResource GrayHeaderStyle}"/>
                        <ig:TextColumn Key="AreaSubLimite" HeaderText="Tipo de Sublimite"  Width="120" HeaderStyle="{StaticResource GrayHeaderStyle}"/>
                        <!--<ig:TextColumn Key="IdVeiculo" HeaderText="Id Veiculo Legal" HeaderStyle="{StaticResource GrayHeaderStyle}"/>
                        <ig:TextColumn Key="NomeVeiculo" HeaderText="Nome Veiculo Legal" IsReadOnly="True" CellStyle="{StaticResource CellColumnStyle}" HeaderStyle="{StaticResource GrayHeaderStyle}"/>-->
                        <!--<ig:TextColumn Key="DataAbertura" HeaderText="Abertura" Width="130" FormatString="{}{0:d}" />-->
                        <ig:DateColumn Key="DataAbertura" HeaderText="Abertura" Width="130" HeaderStyle="{StaticResource GrayHeaderStyle}"/>
                        <ig:DateColumn Key="DataVencimento" HeaderText="Vencimento" Width="130" HeaderStyle="{StaticResource GrayHeaderStyle}"/>
                        <ig:TextColumn Key="CodigoMoeda" HeaderText="Moeda" HeaderStyle="{StaticResource GrayHeaderStyle}"/>
                        <ig:TextColumn Key="ValorOperacao" HeaderText="Vlr. Operação" FormatString="{}{0:N2}" HeaderStyle="{StaticResource GrayHeaderStyle}"/>
                        <ig:TextColumn Key="ValorContabil" HeaderText="Vlr. Contábil" FormatString="{}{0:N2}" HeaderStyle="{StaticResource GrayHeaderStyle}"/>
                        <ig:TextColumn Key="ValorComprometido" HeaderText="Vlr. Comprometido" FormatString="{}{0:N2}" HeaderStyle="{StaticResource GrayHeaderStyle}"/>
                        <ig:TextColumn Key="ValorUpfrontFee" HeaderText="Vlr. Upfront Fee" FormatString="{}{0:N2}" HeaderStyle="{StaticResource GrayHeaderStyle}"/>
                        <ig:TextColumn Key="ValorIndependentAmount" HeaderText="Vlr. Independent Amount" FormatString="{}{0:N2}" HeaderStyle="{StaticResource GrayHeaderStyle}"/>
                        <ig:TextColumn Key="IdEntidadeReferencia" HeaderText="Id Reference Entity" HeaderStyle="{StaticResource GrayHeaderStyle}"/>
                        <ig:TextColumn Key="NomeEntidadeReferencia" HeaderText="Nome Reference Entity" IsReadOnly="True" CellStyle="{StaticResource CellColumnStyle}" HeaderStyle="{StaticResource GrayHeaderStyle}" />
                        <ig:CheckBoxColumn Key="BaixarNoVencimento" IsFilterable="False" IsGroupable="False" IsResizable="False" HeaderStyle="{StaticResource GrayHeaderStyle}">
                            <ig:CheckBoxColumn.HeaderTemplate>
                                <DataTemplate>
                                    <TextBlock Text="BV" ToolTipService.ToolTip="Baixar no Vencimento"/>
                                </DataTemplate>
                            </ig:CheckBoxColumn.HeaderTemplate>
                        </ig:CheckBoxColumn>
                        <ig:CheckBoxColumn Key="SobrepoeAutomatica" IsFilterable="False" IsGroupable="False" IsResizable="False" HeaderStyle="{StaticResource GrayHeaderStyle}" >
                            <ig:CheckBoxColumn.HeaderTemplate>
                                <DataTemplate>
                                    <TextBlock Text="SA" ToolTipService.ToolTip="Sobrepor a Operação Automática"/>
                                </DataTemplate>
                            </ig:CheckBoxColumn.HeaderTemplate>
                        </ig:CheckBoxColumn>
                        <!--<ig:TemplateColumnLayout Key="CustomerID" Template="{StaticResource CustomRowTemplate}" Visibility="{Binding HasItemError, Converter={StaticResource BooleanToVisibilityConverter}}" />-->
                    </ig:XamGrid.Columns>

                    <!--
                    <ig:XamGrid.DeferredScrollingSettings>
                        <ig:DeferredScrollingSettings AllowDeferredScrolling="Default">
                            <ig:DeferredScrollingSettings.DeferredScrollTemplate>
                                <DataTemplate>
                                    <Grid>
                                        <Rectangle Fill="Black" Opacity=".65" />
                                        <StackPanel HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,15,15,0">
                                            
                                            <Grid x:Name="chromeGlass" Background="Transparent" HorizontalAlignment="Center" VerticalAlignment="Center">
                                                <Path x:Name="outerBorder" Margin="0" Height="118" Width="118" 
                                                      Stretch="Fill" Opacity="1" 
                                                      Data="M 594,205 C594,203 570,201 539,201 508,201 484,203 484,205 482,205 480,229 480,260 480,291 482,315 484,315 484,317 508,319 539,319 570,319 594,317 594,315 596,315 598,291 598,260 598,229 596,205 594,205 z" 
                                                      Stroke="#333333" StrokeThickness="1">
                                                    <Path.Fill>
                                                        <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                                            <LinearGradientBrush.GradientStops>
                                                                <GradientStopCollection>
                                                                    <GradientStop Color="#ccffffff" Offset="0" />
                                                                    <GradientStop Color="#4cffffff" Offset="1" />
                                                                </GradientStopCollection>
                                                            </LinearGradientBrush.GradientStops>
                                                        </LinearGradientBrush>
                                                    </Path.Fill>
                                                </Path>
                                                <Path x:Name="innerBorder" Margin="2" Height="116" Width="116" 
                                                      Stretch="Fill" Opacity="1" 
                                                      Data="M 592,207 C594,207 596,229 596,260 596,291 594,313 592,313 592,315 570,317 539,317 508,317 486,315 486,313 484,313 482,291 482,260 482,229 484,207 486,207 486,205 508,203 539,203 570,203 592,205 592,207 zM 593,206 C593,204 570,202 539,202 508,202 485,204 485,206 483,206 481,229 481,260 481,291 483,314 485,314 485,316 508,318 539,318 570,318 593,316 593,314 595,314 597,291 597,260 597,229 595,206 593,206 z">
                                                    <Path.Fill>
                                                        <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
                                                            <LinearGradientBrush.GradientStops>
                                                                <GradientStopCollection>
                                                                    <GradientStop Color="#FFffffff" Offset="0.35" />
                                                                    <GradientStop Color="#FFB932D2" Offset="1" />
                                                                </GradientStopCollection>
                                                            </LinearGradientBrush.GradientStops>
                                                        </LinearGradientBrush>
                                                    </Path.Fill>
                                                </Path>
                                                <Path x:Name="chromeOverlay" Margin="0,2,0,0" VerticalAlignment="Top" Height="61" Width="116" 
                                                      Stretch="Fill" Opacity="1" 
                                                      Data="M 593,206 C593,204 570,202 539,202 508,202 485,204 485,206 483,206 481,226 481,254 497,260 516,263 539,263 561,263 581,260 597,254 597,226 595,206 593,206 z">
                                                    <Path.Fill>
                                                        <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                                            <LinearGradientBrush.GradientStops>
                                                                <GradientStopCollection>
                                                                    <GradientStop Color="#7dffffff" Offset="0" />
                                                                    <GradientStop Color="#59ffffff" Offset="1" />
                                                                </GradientStopCollection>
                                                            </LinearGradientBrush.GradientStops>
                                                        </LinearGradientBrush>
                                                    </Path.Fill>
                                                </Path>
                                                <Rectangle x:Name="smallDarkBorder" Width="104" Height="104" RadiusX="5" RadiusY="5" 
                                                           Stroke="#596965" StrokeThickness="1" Fill="#ffffff" />
                                                <Rectangle Width="106" Height="106" RadiusX="5" RadiusY="5" Stroke="#ffffff" StrokeThickness="1" x:Name="smallLightBorder" />
                                            
                                                <Image Source="{Binding Path=Row.Data.StatusImportacao, Converter={StaticResource StatusImportToImageConverter}}" 
                                                       Width="100" Height="100" VerticalAlignment="Center" HorizontalAlignment="Center" />
                                            </Grid>
                                            
                                            <TextBlock Text="{Binding Path=Row.Data.CodigoContrato}" Foreground="#FFFFFF" FontWeight="Bold" TextAlignment="Center" Margin="0,5,0,0" />
                                        </StackPanel>
                                    </Grid>
                                </DataTemplate>
                            </ig:DeferredScrollingSettings.DeferredScrollTemplate>
                        </ig:DeferredScrollingSettings>
                    </ig:XamGrid.DeferredScrollingSettings>
                    -->

                </ig:XamGrid>

                <Border Background="#FFEFEFEF" BorderThickness="1,0,1,1" BorderBrush="#FF617583" Height="30" 
                         HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Grid.Row="1" Padding="3" >
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>

                        <HyperlinkButton x:Name="lnkDownload" Content="Baixar Planilha Template" VerticalAlignment="Center" HorizontalAlignment="Left"
                                         Foreground="#FF0E50DE" TargetName="_blank" />

                        <StackPanel Orientation="Horizontal" Grid.Column="1">
                            <StackPanel Orientation="Horizontal" ToolTipService.ToolTip="Inclusão de uma nova operação manual">
                                <Image Source="{StaticResource IconeStatusImportIncluir}" Width="16" Height="16" Margin="0,4,0,0"/>
                                <TextBlock Text="Inclusão" VerticalAlignment="Center" Margin="3,8,25,3" />
                                <sdk:Label Content="{Binding InsertCount}" Style="{StaticResource LegendGreen}" Margin="-182,-18,0,0" />
                            </StackPanel>

                            <StackPanel Orientation="Horizontal" ToolTipService.ToolTip="Alteração de uma operação manual não aprovada">
                                <Image Source="{StaticResource IconeStatusImportAlterar}" Width="16" Height="16" Margin="0,4,0,0"/>
                                <TextBlock Text="Alteração" VerticalAlignment="Center" Margin="3,8,25,3" />
                                <sdk:Label Content="{Binding UpdateCount}" Style="{StaticResource LegendBlue}" Margin="-192,-18,0,0" />
                            </StackPanel>

                            <StackPanel Orientation="Horizontal" ToolTipService.ToolTip="Inclusão de copia de uma operação automática ou manual aprovada">
                                <Image Source="{StaticResource IconeStatusImportCopiar}" Width="16" Height="16" Margin="0,4,0,0"/>
                                <TextBlock Text="Copia" VerticalAlignment="Center" Margin="3,8,25,3" />
                                <sdk:Label Content="{Binding CopyCount}" Style="{StaticResource LegendGray}" Margin="-152,-18,0,0" />
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" ToolTipService.ToolTip="Indicador de ocorrência de erro na validação">
                                <Image Source="{StaticResource IconeStatusImportErro}" Width="16" Height="16" Margin="0,4,0,0" />
                                <TextBlock Text="Erro" VerticalAlignment="Center" Margin="3,8,25,3" />
                                <sdk:Label Content="{Binding ErrorCount}" Style="{StaticResource LegendRed}" Margin="-136,-18,0,0" />
                            </StackPanel>
                        </StackPanel>
                    </Grid>
                </Border>

                <TextBlock Style="{StaticResource SubTitlePage}" Text="{Binding NeedProcessCount, FallbackValue='100'}" 
                           Grid.Row="0" Grid.RowSpan="2" HorizontalAlignment="Right" Margin="0,-42,0,0"
                           Visibility="{Binding NeedProcessCount, Converter={StaticResource BooleanToVisibilityConverter}}"/>

                <!--<local:XamGridToolBar x:Name="xgDadosTools" Grid.Row="1" VerticalAlignment="Bottom" Visibility="{Binding Visibility, ElementName=xgDados}"/>-->

                <!--<StackPanel Grid.Row="2" Margin="0,10,0,0" Visibility="Collapsed">
                    <StackPanel Orientation="Horizontal" Margin="0,3" Visibility="Collapsed">
                        <TextBlock Text="Justificativa" Width="100" HorizontalAlignment="Left"  VerticalAlignment="Center"/>
                        <ComboBox Width="350" />
                    </StackPanel>
                    <StackPanel Orientation="Horizontal"  Margin="0,3">
                        <TextBlock Text="Observação" Width="100" HorizontalAlignment="Left"  VerticalAlignment="Top"/>
                        <TextBox Height="40" Width="350"/>
                    </StackPanel>
                </StackPanel>-->
            </Grid>

        </toolkit:BusyIndicator>
    </Grid>
</UserControl>
